package com.punai.dataanalysis.cblib.bo;

import com.punai.common.utils.NumberUtil;

import java.math.BigDecimal;

public class MMAInfo {

    private BigDecimal minPrice = BigDecimal.ZERO;
    private BigDecimal avgPrice = BigDecimal.ZERO;
    private BigDecimal maxPrice = BigDecimal.ZERO;


    public BigDecimal getMinPrice() {
        return NumberUtil.getRoundedTY(minPrice);
    }

    public void setMinPrice(BigDecimal minPrice) {
        this.minPrice = minPrice;
    }

    public BigDecimal getAvgPrice() {
        return NumberUtil.getRoundedTY(avgPrice);
    }

    public void setAvgPrice(BigDecimal avgPrice) {
        this.avgPrice = avgPrice;
    }

    public BigDecimal getMaxPrice() {
        return NumberUtil.getRoundedTY(maxPrice);
    }

    public void setMaxPrice(BigDecimal maxPrice) {
        this.maxPrice = maxPrice;
    }

    public BigDecimal getDeviationPrice(){
        return NumberUtil.subtract(maxPrice,minPrice,3);
    }

}
